<%--
  Created by IntelliJ IDEA.
  User: CrazyTobis
  Date: 2020-05-11
  Time: 21:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="tcjDetail">
<div class="" id="">
    <div class="row">
        <div class="col-3">
            <input class="form-control "readonly value="入库单号:${vo.receptNo}">
        </div>
        <div class="col-2">
            <input class="form-control "readonly value="入库类型:${vo.name}">
        </div>
        <div class="col-2">
            <input class="form-control "readonly value="单据状态:${vo.result}">
        </div>
        <div class="col-5">
            <input class="form-control "readonly value="入库备注:${vo.remakers}">
        </div>
    </div>
</div>

<div id="MyTable">

</div>
<div class="alert alert-secondary" role="alert" data-tcj="all" style="color: #0A160A">

</div>


<div>
    <div style="top: 0px;
    left: -5px;
    width: 159px;
    height: 30px;
    background: #e2f3ff;
    border-radius: 0 17px 17px 0;
    color: #2397f3;
    text-align: center;
    line-height: 30px;">

                经办信息
    </div>
    <div id="infoTable" style="padding-bottom: 50px"></div>
</div>
</div>
<script>
    (function () {

        let pageVO = ${pageVO};
        //总数
        let totle = 0;
        //完好数
        let good = 0;
        //破损数
        let band = 0;

        for (let i = 0; i<pageVO.data.length;i++){

            let data = pageVO.data[i];
           totle+=data.receptAmount;
           good += data.completeAmount;
           band+=data.brokenAmount;

        }
        let content = "合计：     物品种类: "+pageVO.data.length+ "          物品总数：  "+totle+"       完好品总数：  "+good+"      破损品总数:   "+band;

        $('[data-tcj="all"]').html(content);
        let columns =[{field: "id", title: "编号"},
            {field: "goodsName", title: "物品名称"},
            {field: "receptAmount", title: "入库数量"},
            {field: "completeAmount", title: "商品完好数"},
            {field: "brokenAmount", title: "破损数"},
            {field: "remarks", title: "备注"},
            {field: "shelves", title: "位置"},
            {field: "gys", title: "供应商"},
            {field: "value", title: "尺寸"},
            {field: "name", title: "颜色"}];
        let options={
            pageVO:pageVO,
            node:"#MyTable",
            columns:columns,
            isPaging:false,
            isChecked:false

        }
        firstTable(options);

        let info =   ${info};

        columns = [{field: "type", title: "流程名称"},
       {field: "name", title: "经办人"},
       {field: "infoTime", title: "提交时间"},
       {field: "remarks", title: "备注"},
        {field: "result", title: "结果"}];

        firstTable({
            datas:info.data,
            columns: columns,
            node:"#infoTable",
            isPaging:false,
            isChecked:false
        });


    })();
</script>